<?php if ($this->posts_list) {?>
<?php foreach($this->posts_list as $key => $val) {?>
<div class="aw-item" id="aw-item_<?php echo $key;?>">
	<div class="aw-user-imgs">
	<?php if ($val['anonymous'] == 0) { ?><a class="aw-user-name aw-user-name-o hidden-xs" data-id="<?php echo $val['user_info']['uid']; ?>" href="people/<?php echo $val['user_info']['url_token']; ?>" rel="nofollow"><img src="<?php echo get_avatar_url($val['user_info']['uid'], 'max'); ?>" alt="" /><p><?php echo $val['user_info']['user_name'];?></p><?php if ($val['user_info']['verified']) { ?><?php if ($val['user_info']['verified'] == 'personal') { ?><i class="icon icon-v"></i><?php } else { ?><i class="icon icon-v i-ve"></i><?php } ?><?php } ?></a><?php } else { ?><a class="aw-user-name aw-user-name-o hidden-xs" href="javascript:;"><img src="<?php echo G_STATIC_URL; ?>/common/avatar-max-img.png" alt="<?php _e('匿名用户'); ?>" title="<?php _e('匿名用户'); ?>" /><p><?php _e('匿名用户'); ?></p></a><?php } ?>
	<div class="userline hidden-xs" id="userline_<?php echo $key;?>"></div>
	</div>
	<div class="aw-question-content" id="aw-question-content_<?php echo $key;?>">
		<h4>
			<?php if ($val['is_recommend']==1) { ?><span class="spanb_c">荐</span><?php }?>
			<?php if ($val['question_id']) { ?>
			<?php if ($val['view_count']>=FOX_Huo_num) { ?><span class="spanb_b">热</span><?php }?>
			<?php if ($val['answer_count']>=FOX_Gan_num) { ?><span class="spanb_d">议</span><?php }?>
			<?php if ($val['best_answer']>0) { ?><span class="spanb_e">结</span><?php }?>
			<a href="question/<?php echo $val['question_id']; ?>"><?php echo $val['question_content']; ?></a>
			<?php } else { ?>
			<span class="spanb_a">文</span>
			<?php if ($val['views']>=FOX_Huo_num) { ?><span class="spanb_b">热</span><?php }?>
			<?php if ($val['comments']>=FOX_Gan_num) { ?><span class="spanb_d">议</span><?php }?>
			<a href="article/<?php echo $val['id']; ?>"><?php echo $val['title']; ?></a>
			<?php } ?>
		</h4>			
		<div class="inner clearfix">
		<?php if(!$val['attachs']){
		if (is_array($val['answer_users'])) { ?>
		<div class="pull-right hidden-xs contribute">
		    <?php foreach ($val['answer_users'] AS $answer_user) { ?>
		    <a class="aw-user-name" data-id="<?php echo $answer_user['uid']; ?>" href="people/<?php echo $answer_user['url_token']; ?>" rel="nofollow"><img src="<?php echo get_avatar_url($answer_user['uid'], 'mid'); ?>" alt="" /></a>
		    <?php } ?>
		</div>
		<?php } else if ($val['question_id']) { ?>
		<div class="pull-right">
		<a href="question/<?php echo $val['question_id']; ?>#!answer_form" class="pull-right text-color-999"><?php _e('回复'); ?></a>
		</div>
		<?php }} ?>
		<?php if (!$val['question_id']) {
		$str = FORMAT::ubbfirebox($val['message']);
		$str = FORMAT::parse_attachs(nl2br(FORMAT::parse_bbcode(cjk_substr(strip_tags($str), 0, 80, 'UTF-8', '...'))));
		if(strlen(strip_tags($str))>10){?>
		<p class="question-text" style=" color: #666; font-size:13px;">
			<?php echo $str; ?>
		</p>
		<?php }}else{
		$str = FORMAT::ubbfirebox($val['question_detail']);
		$str = FORMAT::parse_attachs(nl2br(FORMAT::parse_bbcode(cjk_substr(strip_tags($str), 0, 80, 'UTF-8', '...'))));
		if(strlen(strip_tags($str))>10){?>
		<p class="question-text" style=" color: #666; font-size:13px;">
			<?php echo $str; ?>
		</p>
		<?php }} ?>
		<p>
			<?php if ($_GET['category'] != $val['category_id'] AND $val['category_info']['title']) { ?>
				<a class="aw-question-tags" href="explore/category-<?php echo $val['category_info']['url_token']; ?>"><?php echo $val['category_info']['title']; ?></a>
				• <?php } ?>
			<?php if ($val['question_id']) { ?>
			<?php if ($val['answer_count'] > 0) { ?>
			<?php if ($val['answer_info']['anonymous']) { ?>
				<a href="javascript:;" class="aw-user-name"><?php _e('匿名用户'); ?></a><?php } else { ?><a href="people/<?php echo $val['answer_info']['user_info']['url_token']; ?>" class="aw-user-name" data-id="<?php echo $val['answer_info']['user_info']['uid']; ?>"><?php echo $val['answer_info']['user_info']['user_name']; ?></a><?php } ?> 
				<span class="text-color-999"><?php _e('回复了问题'); ?> • <?php _e('%s 人关注', $val['focus_count']); ?> • <?php _e('%s 个回复', $val['answer_count']); ?> • <?php _e('%s 次浏览', $val['view_count']); ?> • <?php echo date_friendly($val['update_time']); ?>
				</span>
			<?php } else { ?>
			<?php if ($val['anonymous'] == 0) { ?>
				<a href="people/<?php echo $val['user_info']['url_token']; ?>" class="aw-user-name"><?php echo $val['user_info']['user_name']; ?></a><?php } else { ?><a href="javascript:;" class="aw-user-name" data-id="<?php echo $val['uid']; ?>"><?php _e('匿名用户'); ?></a><?php } ?> 
				<span class="text-color-999"><?php _e('发起了问题'); ?> • <?php _e('%s 人关注', $val['focus_count']); ?> • <?php _e('%s 个回复', $val['answer_count']); ?> • <?php _e('%s 次浏览', $val['view_count']); ?> • <?php echo date_friendly($val['add_time']); ?> 
				</span>
			<?php } ?>
			<?php } else { ?>
				<a href="people/<?php echo $val['user_info']['url_token']; ?>" class="aw-user-name"><?php echo $val['user_info']['user_name']; ?></a> <span class="text-color-999"><?php _e('发表了文章'); ?> • <?php _e('%s 个评论', $val['comments']); ?> • <?php _e('%s 次浏览', $val['views']); ?> • <?php echo date_friendly($val['add_time']); ?></span>
			<?php } ?>
			<?php if($val['attachs']){
			if (is_array($val['answer_users'])) { ?>
				<span class="pull-right hidden-xs contribute">   
				<?php foreach ($val['answer_users'] AS $answer_user) { ?>
				<a class="aw-user-name" data-id="<?php echo $answer_user['uid']; ?>" href="people/<?php echo $answer_user['url_token']; ?>" rel="nofollow"><img src="<?php echo get_avatar_url($answer_user['uid'], 'mid'); ?>" alt="" /></a>
				<?php } ?>
			<?php } else if ($val['question_id']) { ?>
				<span class="pull-right hidden-xs contribute">
				<a href="question/<?php echo $val['question_id']; ?>#!answer_form" class="pull-right text-color-999"><?php _e('回复'); ?></a>
				</span>
			<?php }}?>
		</p>
		</div>
	</div>
</div>

<?php } ?>
<?php } ?>